<?php
import("com.yamvc.event.EventDispatcher");
import("com.yamvc.event.Event");
import("com.yamvc.event.EventListener");
class Proxy {
	/**
	 * Enter description here...
	 *
	 * @var IConnection
	 */
	protected $_connection;
	public function __construct(){
		$this->_connection = DriverManager::getConnection($this->getConfig()->get("config.db.uri"));
	}
	
	public function addEventListener($eventType,EventListener $eventListener){
		Controller::instance()->addEventListener($eventType,$eventListener);
	}
	public function dispatchEvent(Event $event){
		Controller::instance()->dispatchEvent($event);
	}
	/**
	 * Enter description here...
	 *
	 * @return Config
	 */
	public function getConfig(){
		return Application::getAppInstance()->getConfig();
	}
	public function getBackendConfig(){}
}

?>